﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="KhachHangList.aspx.cs"
    Inherits="WebApplication.Admin.KhachHangList" MasterPageFile="~/Admin/Web.Master" %>

<asp:Content ContentPlaceHolderID="Header" runat="server">
</asp:Content>
<asp:Content ContentPlaceHolderID="maint" runat="server">
     <fieldset>
         <legend>Tìm kiếm</legend>
         <table>
             <tr>
                 <td>Mã khách hàng</td>
                 <td><input type="text" id="txtmakh" runat="server" /></td>
                 <td>Tên khách hàng</td>
                 <td><input type="text" id="txttenkh" runat="server" /></td>
                 <td colspan="3"><asp:LinkButton runat="server" ID="lbtncapnhap" CssClass="btn btn-info" OnClick="lbtncapnhap_Click" 
               >Tìm kiếm</asp:LinkButton></td>
             </tr>
             <tr>
                 <td>Địa chỉ</td>
                 <td><input type="text" id="txtdiachi" runat="server" /></td>
                 <td>Số diện thoại</td>
                 <td><input type="text" id="txtsdt" runat="server" /></td>
             </tr>
             
         </table>
     </fieldset>
     <fieldset>
      <legend>Import Khách hàng</legend>
      <div>
       Chọn file : <asp:FileUpload ID="FileUpload1" runat="server" />&nbsp
          <asp:Button ID="btnimport" runat="server" Text="Import Dữ liệu" 
              onclick="btnimport_Click" />
      </div>
     </fieldset>
    <div style="float: right">
        <asp:LinkButton runat="server" ID="lbtnthemmoi" CssClass="btn btn-info" OnClick="lbtnthemmoi_Click">Thêm mới</asp:LinkButton>
    </div>
    <br />
    <div style="margin-top: 25px;">
        <asp:GridView runat="server" ID="GrKhachhang" CssClass="table table-striped table-bordered table-hover"
            AutoGenerateColumns="False" OnRowCommand="GrKhachhang_RowCommand" 
            onrowdatabound="GrKhachhang_RowDataBound" AllowPaging="True" 
            onpageindexchanging="GrKhachhang_PageIndexChanging" 
            onselectedindexchanging="GrKhachhang_SelectedIndexChanging">
            <Columns>
                <asp:TemplateField HeaderText="STT">
                    <ItemTemplate>
                        <%# Container.DataItemIndex+1 %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="MAKH" HeaderText="Mã khách hàng" />
                <asp:BoundField DataField="TENKH" HeaderText="Tên khách hàng" />
                <asp:BoundField DataField="SOTAIKHOAN" HeaderText="Số tài khoản" />
                <asp:BoundField DataField="NGANHANG" HeaderText="Ngân hàng" />
                <asp:BoundField DataField="MASOTHUE" HeaderText="Mã số thuế" />
                <asp:BoundField DataField="DIACHI" HeaderText="Địa chỉ" />
                <asp:BoundField DataField="SDT" HeaderText="Số điện thoại" />
               <%-- <asp:TemplateField HeaderText="Khu vực">
                    <ItemTemplate>
                        <asp:Label ID="lbkhuvuc" runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>--%>
                <asp:BoundField DataField="FAX" HeaderText="Fax" />
                <asp:TemplateField HeaderText="Tình trạng">
                    <ItemTemplate>
                        <asp:Label ID="lbtinhtrang" runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Chức năng">
                    <ItemTemplate>
                        <asp:LinkButton runat="server" ID="lbtnsua" CommandName="lbtnsua" CommandArgument='<%#Bind("MAKH") %>' ><i class="icon-pencil bigger-130"></i></asp:LinkButton>
                        <asp:LinkButton runat="server" ID="lbtnxoa" CommandName="lbtnxoa" CommandArgument='<%#Bind("MAKH") %>' OnClientClick="return confirm('Bạn có  muốn xóa không ?!')"><i class="icon-trash bigger-130 red"></i></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>

            </Columns>
        </asp:GridView>
    </div>
</asp:Content>
